#include<iostream>
#include<vector>

using namespace std;

int main(){
	int n, k, target;
	cin>>n>>k>>target;
	
	vector<vector<int>> dp(n+1, vector<int>(target+1));
	
	int m=min(k,target);
	for(int i=1;i<=m;i++){
		dp[1][i]=1;
	}
	
	for(int i=2;i<=n;i++){
		for(int j=i;j<=target;j++){
			for(int tk=1;j-tk>=0 && tk<=k;tk++){
				dp[i][j] = (dp[i][j] + dp[i-1][j-tk]) % 1000000007;
			}
		}
	}
    cout<<dp[n][target]<<endl;
    return 0;
} 
